package ru.hh.school.commands;

import ru.hh.school.RoomManager;
import ru.hh.school.UserManager;
import ru.hh.school.logging.Logger;
import ru.hh.school.persistence.DataRepository;

import java.util.ArrayList;
import java.util.List;

public final class CommandLister {
    private CommandLister() {

    }

    public static List<Command> getCommandList(Logger logger, UserManager userManager, DataRepository dataRepository, RoomManager roomManager) {
        List<Command> commandsList = new ArrayList<Command>();
        commandsList.add(new QuitCommand(logger, userManager));
        commandsList.add(new SendCommand(logger));
        commandsList.add(new ListRoomCommand(logger, roomManager));
        commandsList.add(new JoinRoomCommand(logger, roomManager));
        commandsList.add(new ConfirmCommand(logger, dataRepository));
        commandsList.add(new PrivCommand(logger, dataRepository, userManager));
        commandsList.add(new OnlineCommand(logger, userManager));
        commandsList.add(new HelpCommand(logger, commandsList));
        return commandsList;
    }
}
